//
//  AXMyNewFarmerPictureCell.m
//  AnXin100
//
//  Created by 天质弘耕 on 2018/11/7.
//  Copyright © 2018 tzhg. All rights reserved.
//

#import "AXMyNewFarmerPictureCell.h"
#import "ZXCategories.h"
#import "UIView+SDAutoLayout.h"

@implementation AXMyNewFarmerPictureCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        
        [self creatView];
        [self setlayout];
    }
    return self;
}

- (void)creatView {
    
    self.sfzLabel = [[UILabel alloc]init];
    self.sfzLabel.font = FONT_FOURTEEN;
    self.sfzLabel.textColor = COLOR_DIV;
    [self.contentView addSubview:self.sfzLabel];
    
    
    /** 身份证正面 */
    self.frontBtn = [[UIButton alloc]init];
    [self.frontBtn setBackgroundImage:[UIImage imageNamed:@"photo"] forState:UIControlStateNormal];
    [self.contentView addSubview:self.frontBtn];
    
    self.frontLabel = [[UILabel alloc]init];
    self.frontLabel.textAlignment = NSTextAlignmentCenter;
    self.frontLabel .font = FONT_FOURTEEN;
    self.frontLabel .textColor = COLOR_DIV;
    [self.contentView addSubview:self.frontLabel ];
    
    
    /** 身份证反面 */
    self.reverseSideBtn = [[UIButton alloc]init];
    [self.reverseSideBtn setBackgroundImage:[UIImage imageNamed:@"photo"] forState:UIControlStateNormal];
    [self.contentView addSubview:self.reverseSideBtn];
    
    self.reverseSideLabel = [[UILabel alloc]init];
    self.reverseSideLabel.textAlignment = NSTextAlignmentCenter;
    self.reverseSideLabel .font = FONT_FOURTEEN;
    self.reverseSideLabel .textColor = COLOR_DIV;
    [self.contentView addSubview:self.reverseSideLabel  ];
    
    self.selectBtn = [[UIButton alloc]init];
    self.selectBtn.titleLabel.font = FONT_FOURTEEN;
    [self.selectBtn setTitleColor:COLOR_Gray forState:UIControlStateNormal];
    [self.contentView addSubview:self.selectBtn];
    
    
}

- (void)setlayout {
    
    
    self.selectBtn.sd_layout
    .rightSpaceToView(self.contentView, 10)
    .topSpaceToView(self.contentView, 0)
    .widthIs(100)
    .heightIs(44);
    
    self.sfzLabel.sd_layout
    .leftSpaceToView(self.contentView, 10)
    .topSpaceToView(self.contentView, 0)
    .rightSpaceToView(self.selectBtn, 10)
    .heightIs(44);
    
    
    
    
    self.frontBtn.sd_layout
    .leftSpaceToView(self.contentView, 10)
    .topSpaceToView(self.sfzLabel,0)
    .widthIs(100)
    .heightIs(100);
    
    
    self.frontLabel.sd_layout
    .centerXEqualToView(self.frontBtn)
    .topSpaceToView(self.frontBtn, 10)
    .widthIs(100)
    .heightIs(44);
    
    
    
    self.reverseSideBtn.sd_layout
    .leftSpaceToView(self.frontBtn, 10)
    .topSpaceToView(self.sfzLabel,0)
    .widthIs(100)
    .heightIs(100);
    
    self.reverseSideLabel.sd_layout
    .centerXEqualToView(self.reverseSideBtn)
    .topSpaceToView(self.reverseSideBtn, 10)
    .widthIs(100)
    .heightIs(44);
    
    
    
    
}

@end
